<template>
    <my-lists v-model="data" :columns="columns" @change="search">

    </my-lists>
</template>

<script>
    import MyLists from "../../../components/layout/my-lists";
    import lists from "../../../mixins/lists";
    
    export default {
        name: "index",
        components: {MyLists},
        mixins: [lists],
        data(){
            return {
                columns: [{
                    title: "操作",
                    key: "display_name"
                },{
                  title: "状态",
                  key: "status_code"
                },{
                    title: "操作人",
                    render: (h, {row}) => {
                        return <span>{row.admin ? row.admin.name : '-'}</span>
                    }
                },{
                  title: "操作时间",
                  key: "created_at"
                }]
            }
        },
        methods: {
            search(page = 1){
                this.$http.get(`logs`, {params: this.request(page)}).then((res) => {
                    this.assignmentData(res.data.data)
                }).catch((res) => {
                    this.formatErrors(res)
                });
            }
        }
    }
</script>

<style scoped>

</style>